package org.jeecg.modules.base.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.base.service.IVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 版本
 * @Author: jeecg-boot
 * @Date: 2021-07-22
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "版本升级")
@RestController
@RequestMapping("/version")
public class VersionController {
    @Autowired
    IVersionService versionService;
    /**
     * @Description: 热更新
     * @return:
     */
    @GetMapping("/checkVersion")
    @ApiOperation(value="热更新",tags={"热更新"},notes="")
    public Result checkVersion(@RequestParam(name = "version") String version, @RequestParam(name = "platform") String platform) {
        Result rs = versionService.checkVersion(version, platform);
        return rs;
    }


}
